<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>搜索结果</title>
    <link rel="stylesheet" href="/static/css/index.css">
    <style>
        .item-list { margin-top: 20px; }
        .item-card { display: flex; align-items: center; border-bottom: 1px solid #eee; padding: 16px 0; }
        .item-img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; margin-right: 24px; }
        .item-info { flex: 1; }
        .item-title { font-size: 18px; font-weight: bold; }
        .item-detail { color: #888; margin: 6px 0; }
    </style>
</head>
<body>
    <div class="my-items-container">
        <h2 class="my-items-title">搜索结果</h2>
        <div class="item-list">
            {{range .items}}
            <div class="item-card">
                <img class="item-img" src="{{if .Image}}{{.Image}}{{else}}/static/img/default.jpg{{end}}" alt="{{.Title}}">
                <div class="item-info">
                    <div class="item-title">{{.Title}}</div>
                    <div class="item-detail">价格：￥{{.Price}} | 分类：{{.Category}} | {{.Detail}}</div>
                </div>
            </div>
            {{end}}
            {{range .staticItems}}
            <div class="item-card">
                <img class="item-img" src="{{.Image}}" alt="{{.Title}}">
                <div class="item-info">
                    <div class="item-title">{{.Title}}</div>
                    <div class="item-detail">价格：￥{{.Price}} | 分类：{{.Category}} | {{.Detail}}</div>
                </div>
            </div>
            {{end}}
            {{if and (not .items) (not .staticItems)}}
            <div style="text-align:center;color:#888;">未找到相关商品</div>
            {{end}}
        </div>
    </div>
</body>
</html> 